# -*- mode: snippet -*-
# name: shiny server validate+need input
# key: shiny.server.validate.need.input
# key: shiny_server_validate_need_input
# key: validate_need_input_shiny_server
# contributor: Shuguang Sun
# --
validate(
  need(
    input$x < 0 && input$trans %in% c("log", "square-root"),
    "x can not be negative for this transformation"
  )
)